package com.huazhi.wzsnw.service.impl;

import com.huazhi.wzsnw.mapper.UserDepMapper;
import com.huazhi.wzsnw.model.UserDep;
import com.huazhi.wzsnw.service.UserDepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserDepServiceImpl implements UserDepService {

    @Autowired
    private UserDepMapper userDepMapper;
    @Override
    public int save(UserDep record) {
        return userDepMapper.insertSelective(record);
    }

    @Override
    public int delete(UserDep record) {
        return userDepMapper.deleteByPrimaryKey(record.getTid());
    }

    @Override
    public int deletes(List<UserDep> records) {
        return 0;
    }

    @Override
    public int update(UserDep record) {
        return 0;
    }

    @Override
    public UserDep findByTid(String tid) {
        return userDepMapper.selectByPrimaryKey(tid);
    }

    @Override
    public List<UserDep> findPagingByListTid(List<String> stringList, Integer pageIndex, Integer pageSize) {
        return null;
    }

    @Override
    public List<String> getListTidByUserTid(String usertid) {
        return userDepMapper.selectListTidByUserTid(usertid);
    }

    @Override
    public List<String> getListTidByDepTid(List<String> deptid) {
        return userDepMapper.selectListTiByDepTid(deptid);
    }
}
